

package com.suzj.extraenchantments.enchant.Ench_02;

import com.suzj.extraenchantments.Config;

import com.suzj.extraenchantments.util.EEChatFormatting;

import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.enchantment.Enchantment;
import net.minecraft.world.item.enchantment.EnchantmentCategory;


public class EnchantmentTheTomeofInfiniteWisdom extends Enchantment {
    public EnchantmentTheTomeofInfiniteWisdom() {
        super(Rarity.VERY_RARE, EnchantmentCategory.ARMOR_CHEST, new EquipmentSlot[]{EquipmentSlot.CHEST});
    }

    public int getMaxLevel() {
        return (Boolean)Config.SERVER.isInfiniteWisdom.get() ? 1 : 0;
    }

    public int getMinCost(int enchantmentLevel) {
        return 40;
    }

    public int getMaxCost(int enchantmentLevel) {
        return 60;
    }

    public Component getFullname(int p_200305_1_) {
      var txt= super.getFullname(p_200305_1_);
      return  txt.copy().withStyle(EEChatFormatting.JiaCu);
    }
}
